Move exposure calculation into its own file.