Fixed Variable Scopes in Core Controller.
Fixed Variable Scopes in Data Controller.