Cleanup

Cleaned up code related to reading files.