Optimize comment handling