Remove bracket endings and comment mappings