phys namespace was split to two headers with/without templates
added checks for deletions by zero
some refactoring