Add command bar, fix bugs