Add generic formatters and stream wrappers. Add getters for resources info. Refactoring.