Get ready for AMP and fix a deprecated import