- Changed testing to be more generic and robust