Better config errors, reported via a message box.
Explicit memory cleanup and returning the application's return value.