Fixed status-controller
Fixing scope and object issues
Fixed invalid object references and refactored json processing function