Add and fix some utility classes