added ui elements, fixed scan bugs, added some tableview logic