Cleanup of file reading / action code into 2 classes