Made requirejs compatible and added comments