Advanced explanation improvement and sample correction

Improved the advanced documentation for requirejs and corrected a sample.