CustomBlock improvements

Use the CustomBlock class to easily create metadata blocks.