registerfile.cpp and .h modified