Parameterization and minor cleanup