fix a bug and optimize message structure
correct api and add sha1 calculation
Now exception and category creation can work
fix 2 issues