Removing extra code and I/O