cleaning up and some documentation