Create chessboard graph on startup, some tweaks to the algorithm

Not quiete there yet. Have to check the best algorithm,