Fix imports, and use absolute rather than relative directories.