Remove sprintf() usages
Add strict typing to traits
Add generics to bags