implement window-buffer communication

...mostly.
Also made it compile, after much work.

To do:
update screen.
revisit file io.
take a look at multi-window and -buffer ogranization.