Added various tests for routines.