Some documentation and cleanup
Tidying up