Redesigned the algorithm for the determination of curves,
fixes in the traffic lights,
some small bug fixes