Removed debug lines and updated input handlers