Deploy refactor