more nonsense

moved bits and pieces around so that the code works in a different
order. we need the window open first thing, and then we need it to exist
seperately from the main code, so if the main code crashes we can
contain it and still manage to save the game or send back a report to
the server. also it's just a nice skill to have.