Fix relative import bug and silence Deprecation Warnings.