fixed problems with `writeTo()` & restructured a bit

The writeTo call shouldn't *need* to receive a callback