Better path generation