Refactoring to be ctor-function instead of object
Full Javascript OO and inheritance on plugin frontend code