Changing flow control to use exceptions (I know...)