Writing to GitHub, Config file and some refactoring