Added messageType function

Added messageType function
Updated package.json

Updated to fit with npm rules