renamed plugin api function from addDock to addPlugin
code cleanup