Wrote unittest and cleaned plugins