Added comments to make code clearer
Polished up a few methods