fix service gateway inability to handle dicts, add unicode test

created a new branch that works around having to deal with problems associated with merging my pull request. I will close the other one.