Revert "Replaced NSMutableData with NSData"

This reverts commit 692b959c29c9073992dc792058e2288d959df9ea.
debug changes