improved interface to 'proxy'
restructured code and include files