add functional nonPlayerController with modular and refactored code