Added lots more comments and tried to squeeze all comments and code into github's max page width