Moved creation of commit to virtual method to allow customization