Code cleanup

Wow! now it almost looks like the UML