completed LINEMODE
cleanup and syntax fixes, removal of old comments