Code cleanup in MP1 plugin