A lot of improvements to gui and read_text()