Added main character object and onkeydown and onkeyup handler