Added the framwork for packet handling