refactoring for company tree compatibility
add a lot of stuff