HIDEOUS! But saving and reading from localStorage works now