Added reading from and writing to file
Merge pull request #4 from wojtasskorcz/master

New, almost final, version