Optimizations: removing unlinked states, identical states, and epsilon transitions.
Packaged things more cleanly