Refactor python scripts
Update subhook