refactoring controllers, service and membership