Refactored tick to use closures.