reorganisation, added missing functions, reparate block for every category