Cleaned up the test code in order to submit to Microsoft