Comments and Fixing up

Added comments to methods and fixed up a few inefficiencies