Updated comments.

Ready for finishing touches before being integrated into a web frontend.