Make use of Commit object

Use the Commit object to pass details around, using a list can get
overly complicated and confusing.

Change-Id: I79e6e1474a38dd0e713fa73f8f4894b22f5381f5