Mass update on rhel6 branch for refactoring and cleanup as per the rhel7 branch.