improved ui, fixed some bugs