Did some code refactoring as well as handling non-existent boards.