implement sync fetch-on-demand. clean up.