fix code complexity issues
Merge pull request #5 from yltsrc/code-cleanup

fix code complexity issues