Add layout support
Fix unit test