Add flatBlock and prettyBlock functions