Astar now takes obstacles into account.
More progress on cave implementation. Other minor improvements.