Makes it easier to import
Added close function and fixed pointer problem
Close function problem.

Didn't seek to the beginning
Merge pull request #1 from lordnathan0/master

Fixes issue where all data was never saved (new data was not copied, only referenced). Adds flush function.