Merge pull request #25 from pavel-pimenov/master

Fix cppcheck
Learn everything that Pavel Pimenov committed
Code cleanup
More code cleanup