Mac: Refactored namespaces and file locations.

Related to issue #381.