Refactored Code to use IPrompt Manager