_class now works with Text blocks

While I'm in here, I might as well make the function more powerful.