Icarus - use a data structure for I/O rather than magic numbers