Quest refactor