dev work on less portiness

Moved porty code to legacy.js and started with some fresh less porty
code on narf.js