Edit tests and fix style