Move ViewNode code into lib/view_node