Refactor layer persistence
Work on layers UI