Fix bugs; improve UI