loading mechanism based on AMD, ready for integration with, e.g., requirejs