Improve namespacing, try 2

Rebased and reopened for Travis. (See #233)