Refactor return_prompt
Get rid of the undefined variables and constants method checks