Added config file sample
Beautify the code and added some comment