got rid of lines function, renamed some things.  added joint op