Making some progress, but still have to figure out the last bits.