added some game functionality: mainly fixing .replace problems:cursor and scroll pos;; needs cleaning