Move running script to lib and config js to configuration