Adding OutputFormatter base class

Yes the clean up of old interface will be done in the PR which wires up the outpuformatter to the Object result. Till then the old code keeps working as is.