Refactored plugins code, made it more "extensible" - i hope :))