Added JavaDoc, minor changes