it now compiles with no errors, lots of refactoring n stuff