Most of layout done