cleaned up and restructured nc3files.py