General refactoring and client-side registration