Enabled agent postition updating during simulation, optimized some code for position retrieval to make it more elegant