Setting goal of a path
Code cleanup