#87 #5 Fixed bugs and improved interface in terminal resizing.