Code formatting and some more tests