Better implementation of removing comments