Cleanup glyph helper and add tests