move setup in constructor to avoid problems with 0-length images
change how drain is handled
use nextTick