Fixing flatten json bug

- fixing a bug when passing an invalid string for the flatten to send back an empty object instead of throw an error
Adding controls for enabling and disabling shortcuts, contexts and environments