More implementation

Started adding API access into the Plugin class.
Mostly taken from reference impl.