starting OS X refactor
more refactoring
more refactor
more refactor