Added Prompt lib and refactored IO using it.