First attempt to speed things up

Good start but not done yet.