I'm trying to tidy up the code and comments to him. Request title: "Fixed bugs, typos"