cleaned up a little bit.
bugfixes and got things to work.