Lots of tweaks to get it running on data