Avoid using * imports
Make public static variables final
fix various issues reported by findbugs:

- use private static class where pos
- remove unused private code, unused variables