Converted terminals to enums and reduced converting stuff to capitalized words, also refined type matching in terminals