Lots of fixes for stuff. Some really messy. I think I don't like java generics.