Gets some more tests to pass.
Minor whitespace tidying.