Useful bits and pieces for OSX