fixed a paging bug, implemented initial local storage for tracking state