fixed mistakes in interfaces. Updated example to use new interfaces.