First phase of #63

#63 is going to be a pain to do a single PR for, so here's just the logic division between the core window controller and the core window service.