transformed requirejs module to more general setup with amd support.