formatting config and added comments

Partially implemented formatting config, and added comments