Refactor stingray manage