Move AMS setup so it is done before the serializers are declared