Replaced Dictionary with List<Tuple>, added tests