Cleaned up path_to method a bit