Added OSX conditionals and made startup work.