Changes to close reader, expanded preview and fixed to_directory function.