Message parsed correctly

Now need to clean up, avoid having magic numbers in the code, modify the broadcast method and change the javascript