Improve comment removal algorithm