Refactored to libs and runner.py