split out proxy into its own file