Functions in ssnt_mete_comp are rewritten

For conciseness and clarity. Not finished yet.