minor cleanup, remove dead private function
simplify frontend by removing casts

an AST should always present a translation unit. introduced one cast to avoid many others