Complete refactoring fo core classes and loading/parsing/saving