Template SDP. Removed some dead code.