Cleaned up code a bit. Working on local storage