cache parsed input file
fixed unit test + a bit of refactoring
Merge pull request #12 from pkoperek/opt/cache-input-file

Opt/cache input file