Replaced some OSX 10.8 deprecated functions. Also a fix for the OSX recently-used menu.