Editing the layouts, solving some layout bugs

Resolved conflicts of #25