tidied up a few things so I could add it to chrome store