Refactors Comet controller and all its events.
Removes extra whitespaces.