Moved the multithreading/server part from the Agent, which was awkward, to the scheduler. Seems to work fine. Also made a simple inventory object