replacing some internal element constructions with named patterns, for clarity

Signed-off-by: greenTara <taraathan@gmail.com>