Added elnode, some cleaning in generic programming