heavy refactoring
company endpoint and base endpoint class