Reorganized the contractForm package and added Javadoc