Added document hidden function
Added input active checks
Moved updated loop to Game class