fixed everything but the potential map algorithm; MIT Licence file added