Use OS agnostic way to extend module search path.
Fix OpenDialog() usage.
Sanity checking and log statements.
Clean up old code, reorder imports.
Add TODOs.