Fix shared unittest and change speed in Unit from ubyte to float.