Refactored tick handlers.