Working on update, minor refactoring