Switched to Java HashMap to make objects serializable.