clean up code.
add class diagram. change class inheritence