some refactoring & updated gcc name to version maping