Added more comments, removed redundant code, clarified config example.