renamed m_type to m_primitive_type and fixed some indentation issues