Code cleanup.
Merge pull request #1 from Dmitry-Me/cleanup

Code cleanup - fix some minor issues