Refactor models and node_api

And another long line.