refactor code; fix queue entry; remove call option in Agent