Hooking up endpoints to views