Update tests, refactor tests