Added parameterization and some other tweaks.