Made over the layout handling, fixed select mode, wip