Update 2.0/static/js/lib/phi/phi.js

Formalised interface implementation.