Modify PARAM object and move out of main so that a PARAM object can be
passed to it via GUI or otherwise.