Move external scripts to lib/