Just Changed some string manipulation to char * instead of strings for
performance reasons.