Refactoring DOM logic. New elements are created each time now to avoid previous custom settings bleeding over into new windows.