Loads of fixes