Refactored. First stab at OSX bootstrap