refactored design of imports, and changed a few implicit relative imports to be explicit