Removes unnecessary prefixes.