Added queueing and switched to a hash for storage.