Tidied up a bit, and mostly working now

Currently has an EOFException when using ImageReader