Refactor for plugman setup