Finally solved JSOM creationg of content types and fields