Some simple random generation code, some TODO and Javadoc comments added.