Improvements based on feedback in pull request