Add comments. Change order of dmap generation
Update dmap
Move some constants out. Swap deltas
Set cost instance variable from parameter
Swap directions