Improved the window positioning code and fixed bug with reseting location.
Made the "show config window" logic more consistent.