Massive refactor, debug mode, REPO_SLUG environment variable and more