minor cleanup
fleshing out pattern operations mode