Major changes and class completion.
Fixed the 'retry' function when a statement fails.