Update packages and refactor controllers tests