Added javadoc comments and started error enum.