Added endpoints

Moved endpoint up into construct