implements open, save, insert image actions and code cleanup