Fixed integer typedefs (should now automatically generate typedefs correctly). Did a lot of cleanup of headers and some reorganization.