Wrote a bunch of smoke loader code. Nearly there...