board: detection of clicked fields
cleanup memory leaks