A bit refactoring
Tiny fixes to prevent possible bugs
Added support of parsing new layers organization (need test deeply)