Made the tetralizer functions static.
Moved tetralizer functions to cpp file.