Offset storage

Fixes a bug with offset storage and creates the first end to end test that shows it works.