Finished the line collision functions.