Refactor kvazaar