Implemented some TUI methods
Fixed main.sql reading