Cleaned up code, and fixed issue with some lines not being diffed

Things I'm still working on:
  - Change to process file in chunks so that files of arbitrary size are
    supported
  - Implement async memory copies to gpu