Updated input/output classes and added functions for map/reduce threads.