Fix planning algorithm
Shorten reference strings