Major refactoring, almost there!