Post build branch clean up code refactored