Creation of block template and lots of tidying to blocks class