Remove unused and commented code.
Remove unused prepare message function.