Fixed some errors in input detection.
Added _draw_surface method.