Slight adoption of pull request; added some annotations