cleaning up, refactoring, moved some files around