Rearranged structure. Separated proxy code for now.