Update Iteration 1.3

Cleaned up the code, put in comments, and fixed the problem where the text cursor didn't follow the text input