added fixes to FF, queue update, code restructuring