Tidied version.