Updated the requireJs implmentation somewhat