improving plane path algorithms, adding tests