Moved formating functions to their own file
Moved tests to their own file