Merge pull request #2 from erocs/master

xyDistance, invert player-beacon matching, retab
Fixed several errors, added imports etc.
Fix most compiler errors