Refactoring and added formats.