add auto-update for types, move error handling in UI thread, #3.