Updated to be used with requirejs