refactored into seperate classes
Added reload of endpoints