Added comments
Attempted to condense the main loop
Revert cbccdbc..e2fc8b6

This rolls back to commit cbccdbcbf4233a4dabb4f465698212bbef60fbb7.
Condensed the main loop to less code.