Fixed "empty board" error with images

>Reorganised loadCanvas() by adding an init() function