Refactored IO package