improved queue handling, removed unnecessary handlers, added more loggin