Moved UI stuff around, fixed client loop