Add block panelr + refactoring code