General cleanup, removal and alteration of redundant code, scripts renamed to plugins