Improved test structure, added layout tests