Some UI improvements, general code fixes