Getting rid of sprintf() altogether and some more small code improvements. Test needs update because insert method changed.