Fixed the AMD boilerplate so that it works with the RequireJS optimizer.