Adding config file option
Major refactor to GNU Coding Standards style