Fixed some bugs to support simulation of multiple connected entities. Added a test verifying the same.