Improved tests greatly