Refactor patentapi code