Remember to advance the data pointer in memwriter
Add pilot saving (untested)