Added setValue and getByValue, fixed some errors