-extern int dcp_audio_frame_rate (int);
-extern int stride_round_up (int, int const *, int);
-extern int round_to (float n, int r);
-extern std::multimap<std::string, std::string> read_key_value (std::istream& s);
-extern int get_required_int (std::multimap<std::string, std::string> const & kv, std::string k);
-extern float get_required_float (std::multimap<std::string, std::string> const & kv, std::string k);
-extern std::string get_required_string (std::multimap<std::string, std::string> const & kv, std::string k);
-extern int get_optional_int (std::multimap<std::string, std::string> const & kv, std::string k);
-extern std::string get_optional_string (std::multimap<std::string, std::string> const & kv, std::string k);
-extern void* wrapped_av_malloc (size_t);
-extern int64_t divide_with_round (int64_t a, int64_t b);
-extern ContentTimePeriod subtitle_period (AVSubtitle const &);
-
-/** @class Socket
- * @brief A class to wrap a boost::asio::ip::tcp::socket with some things
- * that are useful for DCP-o-matic.
- *
- * This class wraps some things that I could not work out how to do with boost;
- * most notably, sync read/write calls with timeouts.
- */
-class Socket
+extern std::string video_asset_filename (std::shared_ptr<dcp::PictureAsset> asset, int reel_index, int reel_count, boost::optional<std::string> content_summary);
+extern std::string audio_asset_filename (std::shared_ptr<dcp::SoundAsset> asset, int reel_index, int reel_count, boost::optional<std::string> content_summary);
+extern std::string atmos_asset_filename (std::shared_ptr<dcp::AtmosAsset> asset, int reel_index, int reel_count, boost::optional<std::string> content_summary);
+extern float relaxed_string_to_float (std::string);
+extern std::string careful_string_filter (std::string);
+extern std::pair<int, int> audio_channel_types (std::list<int> mapped, int channels);
+extern std::shared_ptr<AudioBuffers> remap (std::shared_ptr<const AudioBuffers> input, int output_channels, AudioMapping map);
+extern Eyes increment_eyes (Eyes e);
+extern size_t utf8_strlen (std::string s);
+extern std::string day_of_week_to_string (boost::gregorian::greg_weekday d);
+extern void emit_subtitle_image (dcpomatic::ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, std::shared_ptr<TextDecoder> decoder);
+extern bool show_jobs_on_console (bool progress);
+extern void copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::function<void (float)>);
+extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container, PixelQuanta quanta);
+extern dcp::DecryptedKDM decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm);
+extern boost::filesystem::path default_font_file ();
+extern std::string to_upper (std::string s);
+extern void start_of_thread (std::string name);
+
+template <class T>
+std::list<T>
+vector_to_list (std::vector<T> v)