Refactored ghost controller