Added format adherence information to the output; also major refactor