Added some code for reading files

A work in progress, still doesn’t work due to a type mismatch.