filters, layers and stuff like that in pure javascript