initial dump of extremely messy test code. needs major refactoring.