Finished the average_orientation func, still need unit test...