Tidied up (simplified) the types