Added server and handler code
Added server states