Converted most functions to Character Functions