Fixed silly bugs whichis caused by forgetting that in Java everything is a reference. I've been coding in C++ too much..