Added javadoc for interfaces, modified functions