housekeeping: routine imports organization
Housekeeping: eliminate compile warnings, dead code, etc.

This reduces the number of compile time warnings (as
reported by eclipse) from 257 to 83. Some about using
deprecated APIs are left for a next round.