Refactor to move all js libraries to js/lib directory