Added text-based UI. Fixed validation bug.