initial import of cleaned up 2.5d search and lineclear