Incorporated review feedback in api, fixed javadocs for spi, updated sample