performance fixes to adding comments