Fixes to a* implementation.
More a* fixes, code currently is unused, must be queued manually.