Move endpoint to class variable. General formatting fixes because they were bothering me.