Committing Daman's code changes and clean-up