Editing the layouts, solving some layout bugs

Resolved conflicts of Pull#25