Fixed a few off by 1 bugs and started work on localStorage to persist the data between sessions.