moved REMOTE and BRANCH parameters to the top and basic cleaning