Added print_queue. minor fixes