Fix bug in SafeTableName
Making response format configurable and adding Json format