Cleanup to take comments into account