Use box drawing rutine

This greatly simplifies the code, and also makes it easier to add new windows in the future.