Adding a sample implementation and javadocs