Added some comments and referenced source material