Added layer support to the editor.
Map is now empty (value -1) by default.