comments and code style corrections