Code cleanup
Moved NR3 independent code into separate compilation units.