Rewrote A*

Rewrote it as simply as I could