make internal data structures, code cleanup, refactoring, a lot of stuff