cleanup / code in checkmate