Refactoring towards nnetar.