renaming, refactoring style etc from Code review
move all_formats to base form