Public js api 2

1st step of extraction of plugin facades is complete.