Tweaks and comments
WIP Refactor, added doc strings
params interface code WIP.