Improve window snapping, make main window remember

- Main window saves and loads position
- Windows will never move outside the screen