refactor: use classes for controllers and eliminate `$scope`