Fixed the next screen position and documented the Javascript a bit