Moved SMACK functions to smack.c