removed ClassCast Exception and correclty make KeyValuePair class generic
renamed Queue interface so that it will not be confused with java.util.Queue
renamed all interfaces by adding interface to the class name