Refactored module index parsing