Updated to use requireJS