Updated to_hash to support placeholders.