added hidden template. added some javadocs.