remove unused imports and set some definitions to private