added requirejs optimization. Closes #14