Move AI functions to external file. Add Player API explanation
Minor comments and remove useless code
Add player dinamically to the map