make AppPrefs interface more consistent, fix two /analyze warnings
fix some X64 compilation warnings