Consolidate code for automatically registering new block types