HELP!!Reading Serial Data from GSM as String

I have this code below and it works, my concern is that I want to shorten the program so it is simpler and efficient. I want to read the serial data as string and not by character.

char inchar; // Will hold the incoming character from the GSM shield

int relay1 = 13;
int relay2 = 31;
int relay3 = 32;
int relay4 = 33;

void setup()
{
Serial.begin(9600);
// set up the digital pins to control
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);
pinMode(relay3, OUTPUT);
pinMode(relay4, OUTPUT);
digitalWrite(relay1, LOW);
digitalWrite(relay2, HIGH);
digitalWrite(relay3, HIGH);
digitalWrite(relay4, HIGH);

Serial1.begin(9600);
delay(20000); // give time to log on to network.
Serial1.print("AT+CMGF=1\r"); // set SMS mode to text
delay(100);
Serial1.print("AT+CNMI=2,2,0,0,0\r");
// blurt out contents of new SMS upon receipt to the GSM shield's serial out
delay(100);
Serial.println("Ready...");
}

void loop()
{
//If a character comes in from the cellular module...
if(Serial1.available())
{
inchar=Serial1.read();
if (inchar=='#')
{
delay(10);

inchar=Serial1.read();
if (inchar=='a')
{
delay(10);
inchar=Serial1.read();
if (inchar=='0')
{
digitalWrite(relay1, LOW);
}
else if (inchar=='1')
{
digitalWrite(relay1, HIGH);
}
delay(10);
inchar=Serial1.read();
if (inchar=='b')
{
inchar=Serial1.read();
if (inchar=='0')
{
digitalWrite(relay2, HIGH);
}
else if (inchar=='1')
{
digitalWrite(relay2, LOW);
}
delay(10);
inchar=Serial1.read();
if (inchar=='c')
{
inchar=Serial1.read();
if (inchar=='0')
{
digitalWrite(relay3, HIGH);
}
else if (inchar=='1')
{
digitalWrite(relay3, LOW);
}
delay(10);
inchar=Serial1.read();
if (inchar=='d')
{
delay(10);
inchar=Serial1.read();
if (inchar=='0')
{
digitalWrite(relay4, HIGH);
}
else if (inchar=='1')
{
digitalWrite(relay4, LOW);
}
delay(10);
}
}
Serial1.println("AT+CMGD=1,4"); // delete all SMS
}
}
}
}
}

PLEASE HELP!!!

Your code has a serious flaw. If you first send a '#' and next something else (e.g. 'a'), it will never be executed. But OK, you can solve it when you build the received message first.

You can have a look at Serial Input Basics.