Function clean up
Fix msend()
Optimise & change debug