Refactor family members controller, add error handling