Updated with changes from pull request comments