refactored Angular scope declarations