Tidied up a couple of case statements.