Converted to layers, to-do: thumbnail layers and loading bugfix