Continued refactoring tests. Added verification for error and timeout functionality