Return tuples for status. Some code cleanup as a result. Add support for
MacOS.