Added simple glyph optimization; Changed collision matrix generation algorithm