Move required JS files into separate lib directory