Simplify prompt fetching in the main file (undo a fix for Charm)
Refactor unit test to bundle togeter public APIs