Added amd support, requirejs