added options to layers
merge
fixed edit.js
merge