Add comments and code style fix