Added support for file-IO. Testing data added at the end.