finish callbacks

Kind of ugly at the moment.
clean up, add back a stdin reader as well