Added mode hash helpers and tests. Started with the clone helper.