Add local storage code

heads and tails now get stored, but not really used yet.