Fixed bugs and improved UI