Misc cleanup

Lots of conditionals, but only 2 return options. Just simplifying life :)

Some other misc cleanup items