Move read_from_kb function to UI code
Add comment
Fix #28
More fixes for #28