various tweaks to get everything working on OS X, etc.