fixed misplaced template method to print matrices
Baby steps towards using CImageIO class for image IO (replacing static headers).