Constructor with the params, for easy testing