Moved src prolog generation to own function.