Type reduction to fix file handling

See title.