Added require.js

Added require.js and fixed missing `lib` directory from js.