Added some commentary to code