Code Cleanup

General cleanup to prepare for additional texts to be added. Also
optimized for batched generations.