trivial code formatting
trivial function name tweak
all inline theme setup code moved into functions, action tweaks where applicable, additional code formatting tweaks