Flesh out endpoint API a bit. Add comments and TODOs.