Code cleanup

Added comments
Added regions
Merged some methods
Used loops to modify stuff