fix db retrieving, added save note and save image (CNF - compilable but not finished)