[refac] added debug macros
[feat] added implementation of callbacks

for receiving and sending data tested against the xively server
[refac] updated the implementation of the DIE function