Refactor _getCoordsFromCommand