Code Cleanup

A lot of rewriting in the UI class to get logging working right.
- Fix logging length overflow
- Fix logging width overflow
- Log now scrolls on text overflow (discards old data)