refactored spi and added unit tests
removed HTML from javadoc