Created tests for prompts controller, refactored prompts controller