fixed a bunch of stuff, because refactoring Scala in Eclipse is full of bugs!