Added timer class, cleaned up magic numbers, and made non-functional code changes