Refactored the addToParams function

Check this out.. This should make params persistent across router handles. I need to keep the validity check since context will not know about the params for the first call.