removed switch statement

more tidying up, etc