refactored to remove base classes
added source and javadoc generation
made examples a little more generic