Pulled out character type functions