Fixed inconsistances, added Javadoc