Refactor .net API