More refactor tweaks/fixes