improve popup behavior and formatting; some UI stuff