refactored janus_io.cpp and fallout