Reorganization for better modularity.
- not compilable.