Rewrite staticBrowserREST to be more DRY

... by constructing the calls to obtain.factory.

This includes work of @rrthomas and @graphicore