Simplify tickCounter code