Added calculation of directions
changed functions in StateMap from Models to ModelPostions
Added actionDone to model/StateMap