Parameterization and more cleanup