Added docs and tests to the custom format feature and refactored a bit the class attributes

Thanks
-- 
Jonas