Update according plugin API 0.2.0 (in progress)
Small fixes + refactoring