Moved lib files out of js/lib so that they can set their own dependencies cleanly without messing with the file structure.