Chemical Evolution of Protostellar Matter