Added type functions, condensed to initialize in the class