Fix device scaling
Allow resizing of main window

Fixes #140
Merge branch 'ticket140'