Remove usage of deprecated APIs

This can't be merged until atom/atom@7422f4378e2b30850eeea82b9076bd0f0d83f45e is released.