Fixed screen-resize touch input error; Fixed up code and comments