Added anon namespace around munching functions
Added define checks