added some comments and a HashMap refs #2513