Fixed the endpoints loder. Design influenced by @thorsteinsson