Add type checking to Line tests, misc cleanups