Cleanup & refactoring, WIP