Cleaned up the prompt and fixed function names