Replace 2 redundant getTiles() calls with tileAt() calls
Fix up CMake build

Fix several problems with the CMake build