Fixes #4866: Breaking up monolithic smart-proxy into modules