Fix up code as per review notes