Refactoring (n_tuple --> ntuple).

- Renamed n_tuple to ntuple.
- Other minor changes.