Add documentation and tidy up