Refactored the Prompt class