fix: library format + moved tests to test file