Updated adaptivity implementation