Adding some new tests.
Style improvements.