Compatible with Java 1.6. Fixed some typos