fix findbugs high warnings + some PMD ones
improve code quality
minor fixes improving code quality
fixes #115