resolving most compile errors in newly-migrated code. Organized imports
and fixed package declarations.