Convert some unneeded gotos into returns.