Even more parameterization and cleanup!

Yes, even more.