Added functionality to add individual tables and agents.
Fixed some bounds checking bugs.