Switched from readlines() to read().splitlines()

To minimize string manipulation thereby improving reliability