Cleaned up commitment tab code and added comments