Updated to latest Sandwich interface spec. Fixed several bugs.