Change the scope of RestContext fields & namespace of exceptions fixed.