Fixed segfault; Able to send list of files. Yay\!
Moved identical defintions to auxillary file.