refactor(update): cleanup update logic, flags, remove dead code