Create rectify.js

This file contains the fixes to common JavaScript problems.