Added a timeout and state update function

Will use it as a basis for animation later