cleaned code, allStyles in popup is an array
save and load works