Added some documentation in smack.h.
+ simple refactoring.