Once more from the top with feeling

Moved switch statement to top of file (since changes above it
caused the breakpoint lines to change which caused churn in
Breakpoints.xcbkptlist)

Did a bit of refactoring while I was at it