Move object Hierarchy from BooleanFormula

Place into separate file and lift to package level