Adds more tests and fixes some rules.