This is a problem with newbies. You have to take a backup copy before you even think about screwing with the configuration files. This would have saven you a lot of time. Now you have to play around with the file /etc/XF86config and try to bring back your GUI.
But since this is probably RedHat, it will be easier than some other distros I know of.