Added basic functionality of layout control