improved: code structure from plugin draft

+ refactored: pear coding standard