revamped appoison plugin and fixed some bugs