Sync with various changes from 3.0 branch. Add two new files for config stuff.