refactored formats to own namespace;
little restructuring