Collected all other file loads and websocket config to variables at the
start of the script.
Changed hardcoded terrain size to use the image extents.