address reviewers' comments and remove unused code