add some type annotations
factor this out into a type
factor out redrawing
set up redraw handlers

i don't really understand how this works at all, just copying from the
ImageView package at the moment
add another comment