Changed the names and some methods so its easily used by outside plugins