Cleaned up and commented the code, now the blur works on page refresh and the background is defined only in the HTML so the code would be more modular.