Improve tests and layout