Updated diff based on gholms comments