Make sure to release the COM reference to the dialog when pressing OK or when initialization fails
Merge code cleanup + Documentation