Biosynthesis of terpenoids and steroids