[TASK] Moved completed code in plugin to library