Add MacOS support and make unit neutral