Further work on Format class. Almost fully working.