Cleaned up some if's and checked for proper syntax. Added a validation on GitConf function.