API changes: consolidate main(...) function parameters into options
parameter. Add renderBatch(...) function.
Clean up error handling in tests. Still not 100% happy.
Implement main(...) function.