Off heat, whisk the sugar, cornstarch, and salt together in a medium size saucepan.
Whisk in the milk and egg yolks. Place the mixture over medium heat, constantly whisking and scraping the sides of the pan until the mixture begins to bubble and thicken.
Add the butter 1 tablespoon at a time. When all of the butter is mixed in, add the vanilla and chocolate extract (if using). Add the chocolate a little at a time, giving each addition of chocolate the chance to melt into the filling before adding more. Keep the mixture over the heat until the chocolate is smoothly melted and the cream thickens.
Pour the chocolate filling into the pie shell. Cover the pie with plastic wrap and place in the refrigerator to cool and chill (Note: I like to let it cool at room temperature for about 40 minutes, first). When ready to serve, remove the pie from the refrigerator and remove the plastic wrap.
Whip the cream and sweeten it with the powdered sugar. Stir in some vanilla. Spread or pipe whipped cream over the top.