Creating test routines.
Correcting errors found.