Pulled all functions up, and removed duplicate osx compile function.