libmid: minor cleanup