Layout builder

Merge 2 branch for further development