Added custom formatter example.
Added more docs. Change some functions to public.