crazy refactoring of windowsapp.js

Just tinkering, really. Not sure I particularly like this
API, but it *is* very succinct ...