Compatibility for Mac OS X.
Refactor.
Refactor.