Merge upstream changes and use relative imports