Major bugfixes. Layout snippets