update params and buffer structure

This should be just shy of working, I have yet to test on real data.