Rewrite config loading.

This seriously cleans up OnLoad and OnStart, but more importantly, MFS now
works with 0.23.