tidy up code
Started getting diff working between comit chains