avoid NPE
use decimal literals
delete unused vars
Merge pull request #237 from rostafiychuk/master

clean up and small fixes in test classes