Cleaned up io.h, io.c which had functions not used any more, removed unused