Adding utils and extensions, more refactoring.