Updated tests and code to not call .read() directly