Window state updating

Closes #72, closes #87