Fix tests and style