Added comments to significant methods
Restructured file a bit