Refactor the way time keys work