Working minimizer, and cleaned up.