Clean up and some documentation