Add getter and setter to fields