Added Javadoc and extracted messages