Still refactoring, ALMOST DONE!