Added support for expression-based output parameter setting

Also added a test to cover the usage and took the '4000' value out into a constant.

Addresses issue #163