Merge pull request #1 from ben51/master

Fix two variable initializations (which could lead to crash)
Clean up
Code refactoring
Resize all the windows when the size of the X window changes