First fit plugin restructure