Some style/bug/comment fixes