Refactor and comment IA