Fixed reparenting device to a different folder and allowing to set to tree root.
Added Layout entity and WebAPI controller to access it. Created database migration script to add the table too.