Fixed tests and coding style