interim
big refactor/rearrange of functions.coffee
cleanup; some work for node support