Cleaned up UI code and fixed messaging