simplify implementation by using instance variables instead of NSDictionary; add javadoc