Subroutines refactored to methods. Exception handling added (returning zero on NaN input).
Bugfix: java.io.IOException
Merge pull request #8 from vbence/master

Exception handling on NaN