scanf() width limited.
Possible mem leak fixed.
Possible resource leak fixed.
Changed scanf() limit.
Merge pull request #26 from offa/leaks_fixed

Leaks fixed