Fixed bug causing values to be garbage (believe the stack was being blown
by a character buffer that was too large)
Removed debug stuff