Changed code to work with our files.

Not done yet.