More refactors and some parameter tweaks