Add diagnostics

Adding a diagnostics program. I was getting memory errors, and this program helped me figure out what was going on.