raf refactor