refactor: command-line now works, partially tested. GUI messages import now works, but message streaming broken