added MainClass, general reorganisation of code, and some more changes that i don't remember now. sry