move assignment and batch objects into private classes