made most of the fields public final. removed unused imports.