Move simulation object from object to function & globals. Support window resizing.
split 'spatial' stuff out of 'simulator'