Refactored a lot of output to make it work back and forth with messages