removed unwanted code/comments and added a config dict