Added unit tests for BatchBuilder.  Cleaned up some generics