Reorganize tests
Fmt changes
Improve unittests