Added some commentary to source code