Fixed the remaining bugs in the two unit tests for simulation core.

Next up is to restore lost functionality.

Signed-off-by: null000 <gorha032@umn.edu>
Added use gathering in a templated fashion. Also, unit testing, although
a better one could probably be written.