Changed some underlying data structures for better predictability in testing