Refactored handling of named parameters. 

The purpose is to make it easier to reuse and extend.

any comments?