JSDoc tidy up and documentation added to repo