Revert "Revert "OSX changes, next round""

This reverts commit b3a6969268b2bfa3e2cffff0e1c1b7bcb1e69e47.