Lots of WIP updates

Changed the write out of images program so that it does not load ALL
the data to the local memory before writing out images. Now it load
each chunk, pulls out the relevant info and clears the chunk. Also
working on a version of AlphaSim.