reordered definitions

must define linenode before it can be used