Refactor controlling, more efficient timer