added a test to join blocks
added a forgotten end
added code for joining blocks to an image
moved training to a new function and called it from main
fixed image name
fixed the way saving the vars
added a function to display decompressed img