Added read file function

Some small tweaks (. and $ in places)