major refactoring progress, I/O API updates