Refactor some code out of the presenceHandler.

Also, don't hide the controlbox in the beginning, no need to.