Added support for x+y+ layout, minor bugfixes