Changed template.java and reader.java

Basic examples.