Fix code sniffer issues and add comments.