#660 Added the correct insertion of new blocks depending on the type of the block Add was clicked on and the structure of the template. Also added one rule which was missing to stop text blocks from added else blocks if there is an elseif