Finished remove_crossings() function