Add more comments, minor format changes