implemented fallback to eigenfaces and diffs if necessary, included deallocation functions