code cleanup, added missing javadocs