Improved IO, now strips lines