update comments, fix formatting, make pylint happy