Taking out my nice formatting so that the final compare/diff looks a lot cleaner. It's down to the one function that has changed now.