fix tests, improve layout