Fixed all variable issues & added updating functionality