updates, added ssim and scalar, debugged a lot of things...