first part of the JsFrame migrated
missing functions migrated
code optimised for minimising
JsFrame minimised
Merge branch 'js-frame-upgrade'