Fixed a minor issue and added/fixed some comments