Added TestLayoutLocal2 for more layout tests, refactoring