adding require.js
refactoring to use functions for md list

also switching to require.js model