atfathima: Adds comments and refactors code for ngidp