Made changes requested by Shaun for pull request, mostly adding doxygen comments here and there