Added connection handling logic for updating the browser with phone's dimensions.
Code cleanup and polishing the cursor movements