2nd round of changes based on PR comments