Lots of updating code + ui fixes.