- removing all references to file handling
- abstracting some main logic out to its own package