Added module

Moved file processing logic to its own module