Fixes for tests and rest

So the test now pass as well as in your version. In addition there are a few fixes, notably that angular.config() doesn't have a name, so it needs it's own signature.

Also - since it's a drag to maintain the signatures, it might be a good idea to have then created ad-hoc.