Fix arguments and comments; simplify a few things