Import fix

Hope this is correct now, copied it over from the clean branch and added
the missing imports