Discovery API is not adjusted for internal use, rewrote some documentation and removed duplicate code as well.