Refactored commit manager a bit