Merge pull request #1 from mojodna/master

Misc. tweaks
Free memory associated with window