Refactor framework