Added more functions for functional IO