Fixed failing tests.
Code style corrections.